package priv.dajie.tzzq.bot.model;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

public class BuffSellingItems extends ArrayList<BuffSellingItem> {
    private Map<String, BuffSellingItem> idMap = null;

    public synchronized Map<String, BuffSellingItem> getMap(){
        if(idMap==null){
            idMap = new HashMap<>();
            for (BuffSellingItem buffSellingItem : this){
                idMap.put(buffSellingItem.getOrderid(), buffSellingItem);
            }
        }
        return idMap;
    }


}
